﻿using Prism.Commands;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Input;

namespace WPF01.ViewModels
{
	public class UCBehaviorViewModel : BindableBase
	{

        private string delayName ="等待执行";
        public string DelayName
        {
            get { return delayName; }
            set { SetProperty(ref delayName, value); }
        }




        public ICommand LoadedCommand { get; set; }
        public UCBehaviorViewModel()
        {
            LoadedCommand = new DelegateCommand(async ()=> {
                DelayName = await Loaded();
            });
        }

        private async Task<string> Loaded()
        {
            await Task.Delay(3000);
            return "延时3秒";
        }
	}
}
